﻿<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<%@ taglib prefix="s" uri="/struts-tags" %>     
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>

  <link href="<c:url value='/css/admin2.css'/>" rel="stylesheet"  type="text/css" />  

	  <link href="<c:url value='/css/admin.css'/>" rel="stylesheet"  type="text/css" />  	

         <script language="JavaScript" src="<c:url value='/js/jquery.js'/>"></script>
         <script type="text/javascript" src="<c:url value='/js/jquery.pagination.js'/>"></script>
		 
		 
		         <script type="text/javascript">
   	
            $(document).ready(function(){
		
			  $("[name=gameSceneVO.gamesceneName]").attr({datatype:"*",nullmsg:"请输入名称."});
		var ifenable= $("[name=gameSceneVO.ifEnable]");

	//gendera.attr("datatype","radio");

	ifenable.attr({datatype:"radio",errormsg:"请选择是否启用."});
	//   ifenable[0].attr({datatype:"radio",errormsg:"请选择是否启用."});
			  
			   });
	
			    </script>
			
</head>

<body>
<!--main-->

<div align="center"><font color="red">${requestScope.tip }</font></div>
<div class="bian" style="width: 100%">
			<table width="100%" height="34" border="0" cellpadding="0" cellspacing="0" bgcolor="#DEECF3">
					<tr>
						<td width="16" align="right">&nbsp;</td>
						<td width="27" align="left"><img src="<c:url value='/images/frame/san2.gif'/>" width="17" height="16" /></td>
						<td width="571" align="left"><span class="wen2">
						<c:if test="${addorupdate=='add'}">
 <c:set var="addorupdateinfo" value="游戏场/游戏房间添加"/>
 </c:if>
 <c:if test="${addorupdate=='update'}">
 <c:set var="addorupdateinfo" value="游戏场/游戏房间修改"/>
 </c:if>${addorupdateinfo}
						</span></td>
						<td align="center" valign="middle"></td>
					</tr>
			</table>
</div>
<div style="padding:10px;">	
<s:form id="form1" cssClass="registerform3" name="form1" method="post" action="gameScene_postGamescene.do" theme="simple">

  <table width="100%"  border="0" cellpadding="0" cellspacing="8" border-style="ridge"	bgcolor="#E8F1F7" align="center">
 <tr>
      <td height="28" colspan="3">&nbsp; </td></tr>
    <tr>
      <td width="25%" align="right">游戏场/房间名称：</td>
 <td style="width:205px;">
 
 <s:textfield name="gameSceneVO.gamesceneName" theme="simple" required="true"/> 
 </td>
            <td><div class="Validform_checktip"></div></td>
    </tr>
	     <tr>
      <td align="right">游戏场/桌子启用：</td>
      <td >
      <s:radio list="if_using" name="gameSceneVO.ifEnable" />     </td>    
      <td><div class="Validform_checktip"></div></td>
  
    </tr>


  <tr>
     
      <td colspan="4" align="center" height="40"> 
	  <s:hidden name="gameSceneVO.parentFieldid" required="true"/>
	  <s:hidden name="gameSceneVO.filedId" required="true"/>
	  	  <s:hidden name="gameSceneVO.greade" required="true"/>
    <input id="addorupdate" name="addorupdate" type="hidden" value="${addorupdate}">
	   
	   <input type="submit"  style="margin-right:80px"  value="提 交" class="btnblue1"  />
	   
	 
	   

   </td><td colspan="3"></td>
    </tr>
<tr>
<td colspan="7"  height="230"> </td>
</tr>
  </table>
  
</s:form>

</div>

<script type="text/javascript" src="<c:url value='/js/Validform.js'/>"></script> 

<script type="text/javascript">
$(function(){

	
	$(".registerform3").Validform({
		tiptype:function(msg,o,cssctl){
			//msg：提示信息;
			//o:{obj:*,type:*}, obj指向的是当前验证的表单元素，type指示提示的状态，值为1、2、3、4， 1：正在检测/提交数据，2：通过验证，3：验证失败，4：提示ignore状态;
			//cssctl:内置的提示信息样式控制函数，该函数需传入两个参数：显示提示信息的对象 和 当前提示的状态（既形参o中的type）;
			if(o.obj){//o.obj不为空说明是在检测表单元素;
				var objtip=o.obj.parent().next().find(".Validform_checktip");
				cssctl(objtip,o.type);
				objtip.text(msg);
			}else{//o.obj为空说明是表单提交操作;
				var objtip=$("#msgdemo");
				cssctl(objtip,o.type);
				objtip.text(msg);
			}
		},
		datatype:{//传入自定义datatype类型【方式二】;
			"z2-4" : /^[\u4E00-\u9FA5\uf900-\ufa2d]{2,4}$/,
			"*6-20": /^[^\s]{6,20}$/
		},
		ajaxPost:false,
		postonce:true
	});
	

})
</script>

</body>
</html>

<script>


</script>